.TH C++SIM 3A "11 July 1994" "C++SIM" "C++SIM Reference Manual"
.SH NAME
UniformStream, Draw, ExponentialStream, ErlangStream, HyperExponentialStream, NormalStream \- various pseudo-random number generators.
.SH SYNOPSIS
.B "#ifndef RANDOM_H_"
.br
.B "#   include <ClassLib/Random.h>"
.br
.B "#endif"
.sp
.BI "class Draw"
.br
.BI "{"
.br
.BI "public:"
.br
.BI "	Draw (double p, int StreamSelect = 0);"
.br
.BI "};"

.BI "class UniformStream : public RandomStream"
.br
.BI "{"
.br
.BI "public:"
.br
.BI "	UniformStream (double lo, double hi,"
.br
.BI "                    int StreamSelect = 0);"
.br
.BI "};"

.BI "class ExponentialStream : public RandomStream"
.br
.BI "{"
.br
.BI "public:"
.br
.BI "	ExponentialStream (double Mean,"
.br
.BI "	                   int StreamSelect = 0);"
.br
.BI "};"

.BI "class ErlangStream : public RandomStream"
.br
.BI "{"
.br
.BI "public:"
.br
.BI "	ErlangStream (double Mean, double StdDev,"
.br
.BI "	              int StreamSelect = 0);"
.br
.BI "};"

.BI "class HyperExponentialStream : public RandomStream"
.br
.BI "{"
.br
.BI "public:"
.br
.BI "	HyperExponentialStream (double Mean, double StdDev,"
.br
.BI "	                        int StreamSelect = 0);"
.br
.BI "};

.BI "class NormalStream : public RandomStream"
.br
.BI "{"
.br
.BI "public:"
.br
.BI "	NormalStream (double Mean, double StdDev,"
.br
.BI "	              int StreamSelect = 0);"
.br
.BI "};"
.SH DESCRIPTION
These classes provide pseudo-random number generators based upon the
algorithm provided by RandomStream(3A).

All of their constructors have a default (last) parameter which, if given an
integer value
.B n 
can be used to "discard" the first
.B n 
random numbers taken from the base algorithm.

With the exception of 
.B Draw
they all have a single public method 
.B operator() 
which returns a random number drawn from the relevant distribution.

.B Draw
returns TRUE with the probability given in the first parameter.

.B UniformStream 
returns a number from a uniform distribution with the lower bound of
.B lo 
and an upper bound of
.B hi 
inclusive.

.B ExponentialStream 
returns a number from an exponential distribution with 
.B Mean
as the mean.

.B ErlangStream 
returns a number from an Erlang distribution with a mean of
.B Mean 
and 
.B StdDev
as its standard deviation.

.B HyperExponential 
returns a number from a hyperexponential distribution with a mean
of
.B Mean 
and
.B StdDev 
as its standard deviation.

.B Normal 
returns a number from a normal distribution with a mean of
.B Mean 
and
.B StdDev 
as its standard deviation.
.SH SEE ALSO
RandomStream(3A)
